package com.mz.mattress.admin.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.mz.mattress.api.entity.MemberCashOutOrder;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface MemberCashOutOrderMapper extends BaseMapper<MemberCashOutOrder> {

    @Select("select * from mz_member_cash_out_order where cash_id=#{cashId}")
    MemberCashOutOrder selectByCashId(@Param("cashId") String cashId);

    @Select("select * from mz_member_cash_out_order where member_id=#{memberId} order by id desc limit 1")
    MemberCashOutOrder selectByMemberId(@Param("memberId") Long memberId);

    IPage<MemberCashOutOrder> listPage(Page page,
                                       @Param("name") String name,
                                       @Param("type") Integer type,
                                       @Param("status") Integer status,
                                       @Param("startTime") String startTime,
                                       @Param("endTime") String endTime);
    
}
